<template>
    <div class="news-list">
    <ul>
       <li>编号：{{ route.query.id }}</li>
       <li>标题：{{ route.query.title }}</li>
       <li>内容：{{ route.query.content }}</li>
    </ul>
    </div>
</template>
<script lang="ts" setup name="Detail">
import { useRoute } from 'vue-router';
/* 
    通过useRoute我们能接受来自上一层路由给我们传递的参数
    其参数在query中
    
*/
const route = useRoute()
console.log(route.query.content);


</script>
<style>
.news-list {
    list-style: none;
    padding-left: 20px;
}

.news-list>li {
    line-height: 30px;
}
</style>


